package com.itheima.d9_interface_demo;

import java.util.ArrayList;

public class ClassManager {
    private ArrayList<Student> students = new ArrayList<>();
    private StudentOperator studentOperator = new StudentOperatorImpl2();
    public ClassManager() {
        students.add(new Student("张三", '男', 90));
        students.add(new Student("李四", '女', 80));
        students.add(new Student("王五", '男', 70));
    }

    //打印全班学生信息

    public void printInfo() {
        studentOperator.printAllInfo(students);
    }

    public void printScore(){
        studentOperator.printAverageScore(students);
    }
}
